<style type="text/css">
	.sm_paginator_item_empty.fanpage {
		margin: 0 0 20px;
		width: 100%;
	}
	.sm_paginator_item_empty {
		border: 1px solid #DADADA;
		color: #999999;
		float: left;
		font-weight: bold;
		margin: 5px 2% 20px;
		padding: 150px 0;
		text-align: center;
		vertical-align: middle;
		width: 96%;
	}
</style>
<?php

$payment = Payment_Manager::getInstance();
$idPage = $this->social->getIdPage();
$trial = $payment->getHandlerByCode(Payment_Item_Trial::CODE);
$campaign = $payment->getHandlerByCode(Payment_Item_Campaign::CODE);
$fan_count = $this->social->getFanCount($this->social->getIdPage());
$price = $campaign->getPrice($fan_count);
$isTrialValid = $trial->isValid($idPage);
$isCampaignValid = $campaign->isValid($idPage);

if ($price > 0)
{
	if ($campaign->hasRecord($idPage))
	{
		if(!$isCampaignValid)
		{
			echo $this->partial('underconstruction.phtml', 'payment');
		}
	}
	else
	{
		if ($trial->hasRecord($idPage) && !$isTrialValid)
		{
			echo $this->partial('underconstruction.phtml', 'payment');
		}
	}
}
?>